<%@ page language="java" contentType="text/html; charset=UTF-8"
         isELIgnored="false"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<%
    String path = request.getContextPath();
%>

<html>
    <head>         
        <style>
            body,td,th{font-size:12px; line-height:24px}
            .alllisttitle{ padding-left:10px}
            a:link,a:visited{ color:#000000; text-decoration:none}
            a:hover{ color:#ff0000; text-decoration:none}
            select{ background:#ffffff!important}
        </style>
        <title>最新公告</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link href="<%=path%>/css/style.css" rel="stylesheet" type="text/css">
        <link href="<%=path%>/css/cont.css" rel="stylesheet" type="text/css"/>
        <script type="text/javascript" src="<%=path%>/js/jquery/jquery-1.6.1.min.js"></script>


        <script type="text/javascript">

            function del() {
                var msgs = "确认删除记录吗？";
                if (confirm(msgs) == true) {
                    return true;
                } else {
                    return false;
                }
            }
        </script>

    </head>

    <body  style="text-align:center">

        <s:form action="findlist" method='post' theme="simple" name="form" id="form" namespace="/systemnotice">
            <s:hidden id="page" name="page" ></s:hidden>
            <s:hidden id="pageSize" name="pageSize"></s:hidden>
        </s:form>

        <table width="98%" border="0" align="center" cellpadding="0"
               cellspacing="0">
            <tr>
                <td width="60%">  
                <td width="20%">
                </td>
                <td height="30" style="text-align:right">
                    <table width="60" border="0" cellpadding="0" cellspacing="0"
                           background="../images/addnew002.gif">

                        <tr onClick="window.location='addInput.action'"
                            style="cursor: hand;">
                            <td>
                                <img src="../images/img_1.jpg" style="border:0">
                            </td>
                            <td nowrap>
                                发布公告或最新消息
                            </td>
                            <td align="right">
                                <img src="../images/addnew003.gif">
                            </td>
                        </tr>

                    </table>
            </tr>
        </table>

        <table width="98%" border="0" cellpadding="0" cellspacing="1" bgcolor="#B5D6E6">
            <tr>
                <td colspan="9" style="padding-left:10px">
                    <span style="color:#034486; padding-left:20px;background:url(../images/img_1.jpg) no-repeat left center"><strong>公告列表</strong></span></td>
            </tr>
            <tr>
                <th style="color:#034486; text-align:center; background:#ffffff">序号</th>
                <th style="color:#034486; text-align:center; background:#ffffff">公告标题</th>
                <th style="color:#034486; text-align:center; background:#ffffff">公告发布者</th>
                <th style="color:#034486; text-align:center; background:#ffffff">发布时间</th>
                <th style="color:#034486; text-align:center; background:#ffffff">查看</th>
                <th style="color:#034486; text-align:center; background:#ffffff">修改</th>
                <th style="color:#034486; text-align:center; background:#ffffff">删除</th>
            </tr>
            <s:iterator value="pageBean.list" var="notice" status="stat">
                <tr>

                    <td style="text-align:left; background:#ffffff">
                        ${stat.index+1}
                    </td>
                    <td style="text-align:left; background:#ffffff">
                        <s:property value="title" />
                    </td>
                    <td style="text-align:left; background:#ffffff">
                        <s:property value="authorName" />
                    </td>

                    <td style="text-align:left; background:#ffffff">
                        <s:date name="createTime" format="yyyy-MM-dd HH:mm:ss"/>
                    </td>

                    <td style="text-align:left; background:#ffffff">
                        <a href="#"
                           onclick="window.open('show.action?notice.id=${id}&pid=${pid}&page=${page}','newwindow','height=800, width=800, top=0, left=0, toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, status=no');">查看</a> 

                    </td>

                    <td style="text-align:center; background:#ffffff">

                        <a href="updateInput.action?notice.id=${id}&page=${page}"><img src="<%=path%>/images/img3.gif" style="display:inline; border:0"/></a>

                    </td>
                    <td style="text-align:center; background:#ffffff">

                        <a href="delete.action?notice.id=${id}&page=${page}"
                           onclick="javascript:return del()"><img src="<%=path%>/images/img2.gif" style="display:inline; border:0"/></a>

                    </td>
                </tr>
            </s:iterator>

        </table>


        <s:include value="/common/page.jsp"/>
    </body>
</html>
